﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="ja">
<head>
<title>S_ChangeTabWidthの使用例</title>
<LINK REL="stylesheet" TYPE="text/css" HREF="../sakura.css">
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
</head>
<body>
<small>
Sakura-Editor Macro Reference
</small>
<h2>S_ChangeTabWidthの使用例</h2>

<pre>
<span style="color:green;">&#39;tabsize2to4to8.vbs
&#39;2005/7/31 (日) 08:51:35 (全略)
&#39; タブ幅を 2 -&gt; 4 -&gt; 8 と切り替えます</span>

<span style="color:blue;">Select Case</span> <span style="color:blue;">Editor</span>.<span style="color:blue;">ChangeTabWidth</span>( CLng( <span style="color:red;">0</span> ) )
<span style="color:blue;">Case</span> <span style="color:red;">2</span>:
    <span style="color:blue;">Editor</span>.<span style="color:blue;">ChangeTabWidth</span>( CLng( <span style="color:red;">4</span> ) )
<span style="color:blue;">Case</span> <span style="color:red;">4</span>:
    <span style="color:blue;">Editor</span>.<span style="color:blue;">ChangeTabWidth</span>( CLng( <span style="color:red;">8</span> ) )
<span style="color:blue;">Case Else</span>:
    <span style="color:blue;">Editor</span>.<span style="color:blue;">ChangeTabWidth</span>( CLng( <span style="color:red;">2</span> ) )
<span style="color:blue;">End Select</span>
</pre>

<pre>
<span style="color:green;">//tabsize4to8.ppa
//タブ幅を 4 &lt;-&gt; 8 と切り替えます</span>
<span style="color:blue;">if</span> <span style="color:blue;">S_ChangeTabWidth</span>(<span style="color:red;">0</span>) = <span style="color:red;">4</span> <span style="color:blue;">then</span>
    <span style="color:blue;">S_ChangeTabWidth</span>(<span style="color:red;">8</span>)
<span style="color:blue;">else</span>
    <span style="color:blue;">S_ChangeTabWidth</span>(<span style="color:red;">4</span>)
;
</pre>
<hr>
</body></html>
